home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
BBS_UTL
/
BOI200P
/
IOSUPP.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-12-13
|
2KB
|
76 lines
{ $D-}
{$S-}
{$V-}
Unit IOSupp;
INTERFACE
Procedure CHECKSECONDKEY( { process function keys }
cskey : char); { function key scan code }
IMPLEMENTATION
Uses
BOIDecl,
Async,
IOLib;
Const
null = #$00;
F2 = #$3C;
F7 = #$41;
F8 = #$42;
F9 = #$43;
F10 = #$44;
Procedure CHECKSECONDKEY(cskey : char);
{ this procedure Aborts the program if F-10 is pressed from the local }
{ keyboard }
var
cloop : byte;
begin {* CheckSecondKey *}
if (cskey = f2) and not boi_local then
begin { toggle remote user status line info }
if boi_statmode = sm_time then boi_statmode := sm_help1
else if boi_statmode = sm_help1 then boi_statmode := sm_comm
else if boi_statmode = sm_comm then boi_statmode := sm_vid
else if boi_statmode = sm_vid then boi_statmode := sm_time;
UpdateStatLine
end
else if (cskey = f7) and boi_usetime then
begin { decrease user time remaining by one minute }
Dec(boi_ticks,1092);
boi_timeover := (boi_ticks <= 0);
if boi_statmode = sm_time then UpdateStatLine
end
else if (cskey = f8) and boi_usetime then
begin { increase user time remaining by one minute }
Inc(boi_ticks,1092);
if boi_statmode = sm_time then UpdateStatLine
end
else if cskey = f9 then
begin { boot user off line with simulated line noise }
if not boi_local then
begin
for cloop := 1 to Random(15) + 8 do
SendString(Chr(Random(222)+33),false);
SendString(#7,false);
DropCarrier
end;
Halt
end
else if cskey = f10 then
begin { force exit of game back to BBS }
PortWindow(1,1,80,boi_pagelength);
ClrPortScr;
SendString('The SysOp has terminated this program.',true);
SendString('Please standby as control returns to the BBS.',false);
Halt
end
else cskey := null
end; {* CheckSecondKey *}
begin {* uIOSupp *}
end. {* uIOSupp *}